﻿<%@ Page Language="c#" CodeBehind="RightListView.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.AssginRule.RightListViewPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>RightListView</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script language="javascript">
  //<!--
  function ReturnBack()
  {
    var type = <%= (int)DisplayType %>;
	  if(type == <%= (int)EntityType.Position %>)
		  location.href = "../Position/ListView.aspx?PositionID=<%=ObjID%>";			
	  else if(type == <%= (int)EntityType.Team %>)
		  location.href = "../UnitiveDocument/Switch.aspx?Action=1&ClassID=<%=ObjID%>";
	  else if(type == <%= (int)EntityType.Role %>)
		  location.href = "../Role/ListView.aspx?Role_ID=<%=ObjID%>";			
  }
  
  function GoToAddRightPage()
  {
    window.location.href = "TreeView.aspx?SrcID=<%= ObjID %>&DisplayType=<%= (int)DisplayType %>";
  }
  //-->
  </script>
</head>
<body leftmargin="0" topmargin="0" ms_positioning="GridLayout">
  <form runat="server">
    <uds:PageTitle runat="server" Title="权限列表">
      <input class="redButtonCss" id="btn_DelRight" type="button" value="删除权限" runat="server">
      <input type="button" value="加入权限" class="redButtonCss" onclick="GoToAddRightPage()">
      <input type="button" value="返回" name="cmdReturn" class="redButtonCss" onclick="ReturnBack()">
    </uds:PageTitle>
    <asp:DataGrid ID="RightsGrid" runat="server" AutoGenerateColumns="False" PageSize="15" AllowPaging="True" BorderWidth="1px" BorderColor="#93BEE2" BorderStyle="None" BackColor="White" CellPadding="3" DataKeyField="rule_id" Width="100%" OnPageIndexChanged="DataGrid_PageChanged">
      <SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999" />
      <AlternatingItemStyle BackColor="#E8F4FF" />
      <ItemStyle ForeColor="#003399" BackColor="White" />
      <HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="White" BackColor="#337FB2" />
      <FooterStyle ForeColor="#003399" BackColor="#99CCCC" />
      <Columns>
        <asp:TemplateColumn HeaderText="◎">
          <HeaderStyle HorizontalAlign="Center" Width="2%" />
          <ItemTemplate>
            <asp:CheckBox ID="cb_RightID" runat="server" Checked="False" />
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:BoundColumn DataField="proc_name" HeaderText="权限名">
          <HeaderStyle Font-Bold="True" HorizontalAlign="Left" Width="19%" />
          <ItemStyle HorizontalAlign="Left" />
        </asp:BoundColumn>
        <asp:BoundColumn DataField="proc_desc" HeaderText="权限描述">
          <HeaderStyle Font-Bold="True" HorizontalAlign="Left" Width="58%" />
          <ItemStyle HorizontalAlign="Left" />
        </asp:BoundColumn>
        <asp:TemplateColumn HeaderText="权限对象">
          <HeaderStyle HorizontalAlign="Right" />
          <ItemStyle HorizontalAlign="Right" />
          <ItemTemplate>
            <%# (DataBinder.Eval(Container, "DataItem.classname").ToString()=="") ? "全局" : DataBinder.Eval(Container, "DataItem.classname") %>
          </ItemTemplate>
        </asp:TemplateColumn>
      </Columns>
      <PagerStyle HorizontalAlign="Right" ForeColor="#003399" BackColor="#E8F4FF" Mode="NumericPages" />
    </asp:DataGrid>
  </form>
</body>
</html>
